icondx = 0 /* valeur X & Y de correction pour les icones: correspond */
icondy = 14 /* a la pos. du coin haut/gauche d'une icones ToolManager */
OPTIONS RESULTS
ADDRESS "M2IPort.Rexx"
REQUEST GADGETS "QUIT|CONTINUE" "AVERTISSEMENT !! : Une entité ToolManager de meme type avec strictement le même"||'0a'x||,
"nom crashe le programme de conversion ( icone1: 'Wipe Out' = icone2: 'Wipe Out' est"||'0a'x||,
"prohibe mais icone1: 'Wipe Out' & menu1: 'Wipe Out' convient ). Il n'est pas possible,"||'0a'x||,
"à cause des contraintes d'Arexx, de remedier à cela, désole !"
IF RC=1 THEN EXIT
MESSAGE "Choisissez le fichier de config ToolManager a traiter"
REQFILE
IF RC~=0 THEN DO
MESSAGE "Erreur/fichier ou abandon !"
CALL Exit_M2I2TM
END
tm_file = RESULT
flg= OPEN('tm_cfgfile',tm_file,'R')
MESSAGE "Les objets de toolmanager ne definissent pas toujours un volume par defaut,"||'0a'x||"necessaire sous M2I...Choisissez le volume par default (DH0:, SYS:,...)"
REQDIR "SYS:"
IF RC~=0 THEN DO
MESSAGE "Abandon !"
CALL Exit_M2I2TM
END
defdospath=RESULT
IF defdospath="" THEN defdospath="SYS:"
MESSAGE "Ou mettre le fichier de compte-rendu ?"
REQFILE "T:TM2M2I.log"
IF RC~=0 THEN DO
MESSAGE "Erreur/fichier ou abandon !"
CALL Exit_M2I2TM
END
log_file = RESULT
flg = OPEN('log',log_file,'W')
/* ============================== */
/* CREATION B.D DU FICHIER CONFIG */
/* ============================== */
/* ------------------------- */
/* --- hotkey autorisees --- */
/* ------------------------- */
flg = SETCLIP("hotkey LSHIFT","LSHIFT")
flg = SETCLIP("hotkey LEFT_SHIFT","LSHIFT")
flg = SETCLIP("hotkey RSHIFT","RSHIFT")
flg = SETCLIP("hotkey RIGHT_SHIFT","RSHIFT")
flg = SETCLIP("hotkey SHIFT","RSHIFT")
flg = SETCLIP("hotkey CONTROL","CTRL")
flg = SETCLIP("hotkey CTRL","CTRL")
flg = SETCLIP("hotkey LALT","LALT")
flg = SETCLIP("hotkey LEFT_ALT","LALT")
flg = SETCLIP("hotkey RALT","RALT")
flg = SETCLIP("hotkey RIGHT_ALT","RALT")
flg = SETCLIP("hotkey ALT","RALT")
flg = SETCLIP("hotkey LCOMMAND","LCOMMAND")
flg = SETCLIP("hotkey LAMIGA","LCOMMAND")
flg = SETCLIP("hotkey LEFT_AMIGA","LCOMMAND")
flg = SETCLIP("hotkey LEFT_COMMAND","LCOMMAND")
flg = SETCLIP("hotkey RCOMMAND","RCOMMAND")
flg = SETCLIP("hotkey RAMIGA","RCOMMAND")
flg = SETCLIP("hotkey RIGHT_AMIGA","RCOMMAND")
flg = SETCLIP("hotkey RIGHT_COMMAND","RCOMMAND")
/* ------------------- */
/* --- exec object --- */
/* ------------------- */
SAY "---execs---"
flg = WRITELN('log',"---execs---")
execcnt= 0
flg = READLN('tm_cfgfile') /* ligne de section "Exec Objects" */
IF flg~="Exec Objects" THEN DO
MESSAGE "Ca ne ressemble pas a un fichier"||'0a'x||"de cfg ToolManage en Ascii : Abandon!"
CALL Exit_M2I2TM
END
section = READLN('tm_cfgfile')
DO WHILE section~="---"
execname = "execobj "||section
flg = WRITELN('log',execname)
execinfo = READLN('tm_cfgfile')
execinfo = execinfo||"¶"||READLN('tm_cfgfile')
execinfo = execinfo||"¶"||READLN('tm_cfgfile')
execinfo = execinfo||"¶"||READLN('tm_cfgfile')
execinfo = execinfo||"¶"||READLN('tm_cfgfile')
execinfo = execinfo||"¶"||READLN('tm_cfgfile')
execinfo = execinfo||"¶"||READLN('tm_cfgfile')
flg = SETCLIP(execname,execinfo)
execcnt = execcnt + 1
section = READLN('tm_cfgfile')
END
SAY execcnt
flg = WRITELN('log','total tools: '||execcnt)
/* -------------------- */
/* --- image object --- */
/* -------------------- */
SAY "---images---"
flg = WRITELN('log',"---images---")
imagcnt = 0
flg = READLN('tm_cfgfile') /* ligne de section "Image Objects" */
section = READLN('tm_cfgfile')
DO WHILE section~="---"
imagname = "imagobj "||section
flg = WRITELN('log',imagname)
imaginfo = READLN('tm_cfgfile')
flg = SETCLIP(imagname,imaginfo)
imagcnt = imagcnt + 1
section = READLN('tm_cfgfile')
END
SAY imagcnt
flg = WRITELN('log','total images: '||imagcnt)
/* -------------------- */
/* --- sound object --- */
/* -------------------- */
SAY "---sounds---"
flg = WRITELN('log',"---sounds---")
soundcnt = 0
flg = READLN('tm_cfgfile') /* ligne de section "Sound Objects" */